<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : viewDetailedJob.xsl
    Created on : July 7, 2012, 11:09 AM
    Author     : Duc Huy
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>
    <xsl:param name="employer1"/>
    <xsl:template match="/">
        <xsl:variable name="employerXML" select="document($employer1)"/>
        <html>
            <body>
              
                <h1><span style="color:#008080">Your recruitment information</span></h1>
                <hr/>
                <h2><i>Job</i></h2>
                <table border="0">
                    <xsl:for-each select = "job">
                    <tr>
                        <td><b>Name: </b></td>
                        <td><xsl:value-of select="jobName"/></td>
                    </tr>
                    <tr>
                        <td><b>Description: </b></td>
                        <td><xsl:value-of select="jobDesc"/></td>
                    </tr>
                    <tr>
                        <td><b>Career: </b></td>
                        <td><xsl:value-of select="career"/></td>
                    </tr>
                    <tr>
                        <td><b>Type: </b></td>                       
                            <xsl:if test = "jobType='1'">
                                <td>Part time</td>
                            </xsl:if>
                            <xsl:if test = "jobType='0'">
                                <td>Full time</td>
                            </xsl:if>                            
                    </tr>                    
                    <tr>
                        <td><b>Needed Position: </b></td>
                        <td><xsl:value-of select="neededPos"/></td>
                    </tr>
                    <tr>
                        <td><b>City: </b></td>
                        <td><xsl:value-of select="city"/></td>
                    </tr>
                    <tr>
                        <td><b>Quantity: </b></td>
                        <td><xsl:value-of select="jobLimit"/></td>
                    </tr>
                    <tr>
                        <td><b>Salary Offer: </b></td>
                        <td><xsl:value-of select="salaryOffer"/></td>
                    </tr>
                    <tr>
                        <td><b>Benefit: </b></td>
                        <td><xsl:value-of select="jobBenefit"/></td>
                    </tr>
                    <tr>
                        <td><b>Required Experience: </b></td>
                        <td><xsl:value-of select="requiredExp"/></td>
                    </tr>
                    <tr>
                        <td><b>Required Education: </b></td>
                        <td><xsl:value-of select="requiredEdu"/></td>
                    </tr>
                    <tr>
                        <td><b>Other Requirement: </b></td>
                        <td><xsl:value-of select="otherRequire"/></td>
                    </tr>
                    <tr>
                        <td><b>Profile Deadline: </b></td>
                        <td><xsl:value-of select="dayOfProfileDealine"/>/
                            <xsl:value-of select="monthOfProfileDealine"/>/
                            <xsl:value-of select="yearOfProfileDeadline"/>
                        </td>
                    </tr>
                    <tr>
                        <td><b>Profile Requirement: </b></td>
                        <td><xsl:value-of select="profileRequire"/></td>
                    </tr>                                                 
                    </xsl:for-each>
                </table>

             <hr/>
             
                <h2><i>Employer</i></h2>
                <table border="0">
                    <xsl:for-each select = "$employerXML/employer">
                    <tr>
                        <td><b>Company Name: </b></td>
                        <td><xsl:value-of select="companyName"/></td>
                    </tr>
                    <tr>
                        <td><b>Company Description: </b></td>
                        <td><xsl:value-of select="companyDesc"/></td>
                    </tr>
                    <tr>
                        <td><b>Company Address: </b></td>
                        <td><xsl:value-of select="companyAddress"/></td>
                    </tr>
                    <tr>
                        <td><b>Company location: </b></td>
                        <td><xsl:value-of select="city"/></td>
                    </tr>
                    <tr>
                        <td><b>Company Website: </b></td>
                        <td><xsl:value-of select="website"/></td>
                    </tr>
                    <tr>
                        <td><b>Employer name: </b></td>
                        <td><xsl:value-of select="fullname"/></td>
                    </tr>
                    <tr>
                        <td><b>Employer current position: </b></td>
                        <td><xsl:value-of select="currentPos"/></td>
                    </tr>
                    <tr>
                        <td><b>Employer phone: </b></td>
                        <td><xsl:value-of select="phone"/></td>
                    </tr>
                    <tr>
                        <td><b>Employer email: </b></td>
                        <td><xsl:value-of select="email"/></td>
                    </tr>
                    <tr>
                        <td><b>Employer address: </b></td>
                        <td><xsl:value-of select="address"/></td>
                    </tr>
                    </xsl:for-each>
                </table>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>
